import React from "react";
import { useLocation } from "react-router-dom";

/** 获取地址参数订单id */
export function useSearchId() {
    const { search } = useLocation();

    const id = React.useMemo(() => new URLSearchParams(search).get('id'), [search])

    return {
        /** 订单id */
        id,
    }
}